#include "widgetSwap.h"

//widgetswap---------------------------
//constructs
wSwap::wSwap(){

}
wSwap::~wSwap(){
    clearMem();
}
//manips
int wSwap::remember(Gtk::Widget* wdgt){
    ptrs.push_back(wdgt);
    return ptrs.size() - 1;
}
void wSwap::clearMem(){
    for(int i = 0; i < ptrs.size(); i++){
        ptrs[i]->set_visible(false);
        delete ptrs[i];
    }
}
Gtk::Widget* wSwap::get(int widgetId){
    if(widgetId < ptrs.size()){
        return ptrs[widgetId];
    }
    return NULL;
}
//=====================================
